<?php

class m120607_015022_create_insurance extends EDbMigration {

	public function safeUp() {
		$columns = array(
			'id'=>'pk',
			'employeeId'=>'integer not null',
			'name'=>'varchar(128) not null',
			'code'=>'varchar(128)',
			'validFrom'=>'date',
			'validUntil'=>'date',
			'note'=>'text',
			'createdAt'=>'datetime',
			'updatedAt'=>'datetime',
			'createdBy'=>'integer',
			'updatedBy'=>'integer',
		);
		$this->createTable('insurances', $columns);
	}

	public function safeDown() {
		$this->dropTable('insurances');
	}

}